﻿@using ECG.WebUI.CustomHelpers
@model IEnumerable<ECG.Common.ViewBannerClientDto>
@{
    var bannerFilter = Model.Where(m => m.PageKey == "TRANG-CHU" & m.PositionKey == "BANNER-RIGHT-TOP-ON-HOME");
}
@if (bannerFilter.Any())
{
    var count = 0;
    <div class="bb_adv_module fl-r">
        @foreach (var item in bannerFilter.OrderBy(m => m.BannerImageOrder))
        {
            <a href="@string.Format("{0}", string.IsNullOrEmpty(item.Url) ? "javascript:void(0);" : item.Url)" class="bb_adv_box" style="@string.Format("{0}", count > 0 ? "margin-top: 10px" : "")">
                <img src="@item.ImagePath.ImagePathThumbDefault()" width="@item.Width" height="@item.Height" alt="@item.Description" />
            </a>
            count++;
        }
    </div>
    <div class="clr"></div>
}